package com.woniuxy.ptapp.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.commons.util.BeanCopyUtil;
import com.woniuxy.commons.util.DateUtil;
import com.woniuxy.ptapp.common.exception.EnumExceptionCode;
import com.woniuxy.ptapp.common.exception.WoniuxyException;
import com.woniuxy.ptapp.common.param.LoginUser;
import com.woniuxy.ptapp.common.util.GetLogingUser;
import com.woniuxy.ptapp.common.util.OrderSequenceRandom;
import com.woniuxy.ptapp.infra.model.ClassesInfo;
import com.woniuxy.ptapp.infra.ClassesInfoDao;
import com.woniuxy.ptapp.infra.model.ClassesOrder;
import com.woniuxy.ptapp.service.ClassesInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.ptapp.service.dto.ByClassesDto;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.UUID;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangdong
 * @since 2022-07-30
 */
@Service
public class ClassesInfoServiceImpl extends ServiceImpl<ClassesInfoDao, ClassesInfo> implements ClassesInfoService {


    @Override
    public Boolean checkClaessId(Integer id) {

        ClassesInfo classesInfo = this.getOne(new QueryWrapper<ClassesInfo>().eq("id", id));
        if(null==classesInfo){
            throw new WoniuxyException(EnumExceptionCode. getClaessIdFail.getCode(),EnumExceptionCode. getClaessIdFail.getMessage());
        }
        return true;
    }


}
